
//
//  UIImageView+YKExtension.m
//  baisi
//
//  Created by 吴高烽 on 2016/10/28.
//  Copyright © 2016年 吴高烽. All rights reserved.
//

#import "UIImageView+YKExtension.h"
#import <UIImageView+WebCache.h>
@implementation UIImageView (YKExtension)
-(void)setHeaderImage:(NSString *)url{
    UIImage *placeholderImage = [[UIImage imageNamed:@"defaultUserIcon"] circleImage];
    [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:placeholderImage completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        self.image = image ? [image circleImage] : placeholderImage ;
    }];
}
@end
